package edu.njit.hz278.tictactoe;

public class Room {
	int id;
	int aid;
	int bid;
	long time;
	byte awin;

	boolean needPassword;
	String auserid;

	public String getAuserid() {
		return auserid;
	}

	public void setAuserid(String auserid) {
		this.auserid = auserid;
	}

	public boolean isNeedPassword() {
		return needPassword;
	}

	public void setNeedPassword(boolean needPassword) {
		this.needPassword = needPassword;
	}

	public byte getAwin() {
		return awin;
	}

	public void setAwin(byte awin) {
		this.awin = awin;
	}

	String name;

	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}

	public int getAid() {
		return aid;
	}

	public void setAid(int aid) {
		this.aid = aid;
	}

	public int getBid() {
		return bid;
	}

	public void setBid(int bid) {
		this.bid = bid;
	}

	public long getTime() {
		return time;
	}

	public void setTime(long time) {
		this.time = time;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String toString() {
		return String.format(
				"{id: %d, name: \"%s\", pwd: %d, aid: %d, ownerid: '%s'}", id,
				name, needPassword ? 1 : 0, aid, auserid);
	}
}
